<html>
<head><meta charset="utf-8"><title>rustc_metadata dump · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html">rustc_metadata dump</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227035608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227035608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227035608">(Feb 19 2021 at 22:03)</a>:</h4>
<p>how can I get a dump of what rustc_metadata produces?</p>



<a name="227035663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227035663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227035663">(Feb 19 2021 at 22:03)</a>:</h4>
<p>have read in the docs about <code>-Zdump-mir-spanview</code></p>



<a name="227035672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227035672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227035672">(Feb 19 2021 at 22:03)</a>:</h4>
<div class="codehilite"><pre><span></span><code>In addition to [graphviz output](#formatting-graphviz-output-dot-files), MIR debugging
flags include an option to generate a MIR representation called `Spanview` that
uses HTML to highlight code regions in the original source code and display
compiler metadata associated with each region.
</code></pre></div>



<a name="227035739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227035739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227035739">(Feb 19 2021 at 22:03)</a>:</h4>
<p>but I guess maybe metadata is used in a generic way and is not the information I want</p>



<a name="227035947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227035947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227035947">(Feb 19 2021 at 22:04)</a>:</h4>
<p>and another related question, is there a Rust metadata visualizer? like if I have an rmeta file can I visualize it in some way?</p>



<a name="227036026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227036026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227036026">(Feb 19 2021 at 22:05)</a>:</h4>
<p>want to debug an issue and this information would be helpful</p>



<a name="227036933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227036933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227036933">(Feb 19 2021 at 22:09)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/rustc_metadata.20dump/near/227035947">said</a>:</p>
<blockquote>
<p>and another related question, is there a Rust metadata visualizer? like if I have an rmeta file can I visualize it in some way?</p>
</blockquote>
<p>That would be a cool feature!</p>



<a name="227037050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227037050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227037050">(Feb 19 2021 at 22:10)</a>:</h4>
<p>let's keep adding tasks for rustc-dev-guide :)</p>



<a name="227037101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227037101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227037101">(Feb 19 2021 at 22:10)</a>:</h4>
<p>but I have no idea, I was naively asking because maybe this already exists</p>



<a name="227072817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/227072817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#227072817">(Feb 20 2021 at 07:06)</a>:</h4>
<p>I wrote this a while ago, but it hasn't been updated for almost a year: <a href="https://github.com/bjorn3/rust_read_rlib">https://github.com/bjorn3/rust_read_rlib</a></p>



<a name="230874357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc_metadata%20dump/near/230874357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc_metadata.20dump.html#230874357">(Mar 18 2021 at 14:39)</a>:</h4>
<p>You can use <code>rustc -Z ls</code>, but it doesn't show very much</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>